<template>
    <div class="header-wrap" v-show="show">
        <div class="back">
            <router-link class="collapseArrow left" :to="backPath" v-if="hideBackPath"></router-link>
        </div>
        <p>{{ this.title }}</p>
    </div>
</template>
<style lang="scss" scoped>
</style>
<script>
    export default {
        name: 'MyHeader',
        data() {
            return {
                show: this.$route.meta.show,
                backPath: this.$route.meta.backPath || this.$route.params.backPath,
                hideBackPath: !this.$route.meta.hideBackPath,
                title: this.$route.meta.title
            }
        },
        created() {
            /*(() => {
                console.log('路由变化')
                this.show = this.$route.meta.show
                this.backPath = this.$route.meta.backPath
                document.title = this.title
            })()*/
        }
    }
</script>
